import random

modes = (1, 2)


def reduce(n: int):
    cooldown = []
    record = []
    while n >= 0:
        mode = random.choice(modes)
        if mode == 2:
            if not cooldown:
                cooldown = [1] * 3
            elif n == 1:
                mode = 1
            else:
                mode = 1

        record.append(f'-{mode}')
        n = n - mode
        if len(cooldown) > 0:
            cooldown.pop()

    return record


def statistics(num, count):
    records = {}
    for i in range(count):
        record = reduce(num)
        records.setdefault(tuple(record), True)

    print(len(records))
    print(records)


# reduce(20)
# statistics(20, 10000)


def mod_n(n):
    nlist = [1]*20
    div = n // 4




mod_n(21)




